/*
 * commons is a based project implemented
 * Copyright (C) 2024 Jasmine
 */
package com.easy.core.exception;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;

/**
 * 应用系统级别的错误码
 *
 * @author Jasmine
 * @since 1.0.0
 */
@Tag(name = " 应用系统级别的错误码")
@SuppressWarnings("all")
public enum GlobalResultInfoEnum implements ResultInfoInterface {
    SUCCESS(0, "操作成功。"),
    FAILED(500, "操作失败!"),;

    @Schema(name = "返回码")
    private int code;
    @Schema(name = "返回消息")
    private String message;

    // @Schema(name = "英文返回消息")
    // private String enMessage;

    GlobalResultInfoEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
